package com.yang.mapper;

import com.yang.pojo.Food;
import com.yang.pojo.FoodType;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/**
 * Created by 杨天可 on 2022/3/29 10:57
 */
public interface FoodMapper extends Mapper<Food>{

    List<Food> selectByFoodTypeId(Integer foodTypeId);

    List<Food> findByType(String foodTypeId);

    List<Food> findBDisCountFood(Integer userId);

    /* 管理员查找所有菜品+分页*/
    List<Food> findByLimit(Integer foodTypeId, String name, Integer startPage, Integer endPage);

    /* 管理员查找所有菜品*/
    List<Food> findAll(Integer foodTypeId, String name);

    List<Food> findByUserIdLimit(Integer userId, Integer foodTypeId, String name, Integer startPage, Integer endPage);

    List<Food> findByUserId(Integer userId, Integer foodTypeId, String name);

    Food findFoodById(Integer foodId);

    void updateById(Food food);
}
